import com.medreams.domain.Test;
import com.medreams.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class test {

    @Autowired
    private TestService test;

    @org.junit.Test
    public void Test() {
        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("src/main/applicationContext.xml");
        TestService testService = classPathXmlApplicationContext.getBean("testService", TestService.class);
        List<Test> all = testService.findAll();
        System.out.println(all);
    }
}
